package com.qf.team2.netdisc.dao;

import com.qf.team2.netdisc.common.pojo.entity.AlipayOrder;
import com.qf.team2.netdisc.common.pojo.qo.AlipayOrderQO;
import org.apache.ibatis.annotations.Param;

/**
 * 支付宝订单数据接口
 *
 * @author Simon_Wong
 * @date 2021/05/26 11:44
 */
@SuppressWarnings("AlibabaLowerCamelCaseVariableNaming")
public interface AlipayOrderMapper {

    /**
     * 新增订单
     *
     * @param alipayOrderQO 支付宝订单参数实体:
     * @return int
     */
    int insertOrder(AlipayOrderQO alipayOrderQO);

    /**
     * 更新订单状态
     *
     * @param orderId 订单id
     * @param status  新的状态
     * @return int
     */
    int updateOrder(@Param("orderId") Integer orderId, @Param("status") int status);

    /**
     * 根据id获取订单
     *
     * @param orderId 订单id
     * @return {@link AlipayOrder}
     */
    AlipayOrder selectOrder(Integer orderId);
}
